<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${group.id}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-2 control-label">采购合同编号：</label>
								<div class="col-sm-4">
									<input id="groupid" name="groupid" th:value="${group.groupid}" class="form-control" type="text">
								</div>
								<label class="col-sm-2 control-label">所属项目：</label>
								<div class="col-sm-4">
									<select data-placeholder="--所属项目--" name="projectId" id="projectId"
											class="form-control" tabindex="2" required>
										<option value="">--所属项目--</option>
										<option th:each="projectDO:${projectDOList}" th:value="${projectDO.id}"
												th:text="${projectDO.itmNumber}"
												th:selected="${group.projectId} == ${projectDO.id}"></option>
									</select>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-2 control-label">采购类型：</label>
								<div class="col-sm-4">
									<select data-placeholder="采购类型"  id="purType"  name="purType" class="form-control chosen-select" tabindex="2" required>
										<option value="">采购类型</option>
										<option value="1" th:selected="1 == ${group.purType}">公司采购</option>
										<option value="2" th:selected="2 == ${group.purType}">现场采购</option>
										<option value="3" th:selected="3 == ${group.purType}">分包</option>
										<option value="4" th:selected="4 == ${group.purType}">其他</option>
									</select>
								</div>
								<label class="col-sm-2 control-label">供应商：</label>
								<div class="col-sm-4">
									<select data-placeholder="--供应商--" name="supplierId" id="supplierId"
											class="form-control" tabindex="2" required>
										<option value="">--供应商--</option>
										<option th:each="supplier:${supplierList}" th:value="${supplier.id}"
												th:text="${supplier.name}"
												th:selected="${group.supplierId} == ${supplier.id}"></option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">税率：</label>
								<div class="col-sm-4">
									<input id="taxRate" name="taxRate" th:value="${group.taxRate}" class="form-control" type="number">
								</div>
								<label class="col-sm-2 control-label">采购总价：</label>
								<div class="col-sm-4">
									<input id="allPurprice" name="allPurprice" th:value="${#numbers.formatDecimal(group.allPurprice,1,'COMMA',2,'POINT')}" class="form-control" type="number">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">采购时间：</label>
								<div class="col-sm-4">
									<input type="text" class="laydate-icon layer-date form-control" id="signTime" name="signTime" placeholder="采购时间"
										   onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" th:value="${#dates.format(group.signTime, 'yyyy-MM-dd')}" style="background-color: #fff;" readonly="readonly"/>
								</div>
								<label class="col-sm-2 control-label"></label>
								<div class="col-sm-4"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">采购内容：</label>
								<div class="col-sm-10">
									<textarea id="purDescr" name="purDescr" th:text="${group.purDescr}" class="form-control"></textarea>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">备注：</label>
								<div class="col-sm-10">
									<textarea id="remark" name="remark" th:text="${group.remark}" class="form-control"></textarea>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script src="/js/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/pur/group/edit.js"></script>
	<script type="text/javascript" src="/js/plugins/cropper/cropper.min.js"></script>
	<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js" ></script>
	<script type="text/javascript" src="/js/plugins/distpicker/distpicker.data.min.js"></script>
	<script type="text/javascript" src="/js/plugins/distpicker/distpicker.min.js"></script>
</body>
</html>
